using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;

using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;


namespace QQZiFramework
{
    
    [AttributeUsage(AttributeTargets.Class, Inherited = true)]
    public class DBTableAttribute : Attribute
    {
        /// <summary>
        /// 对就的数据表名
        /// </summary>
        public string TableName { get; set; }
        /// <summary>
        /// 是否是虚拟实体（扩展），true则在查询的时候不加表别名
        /// </summary>
        public bool IsVirtual { get; set; }
        /// <summary>
        /// 做为树结构时，编码长度（默认为2，比如AA）
        /// </summary>
        public int TreeCodeLenth { get; set; }

        public DBTreeMode TreeMode { get; set; }

        public DBTableAttribute()
        {
            TreeCodeLenth = 2;
            TreeMode = DBTreeMode.Code;
        }

    }

    //树型模式：普通编号与用别一张大表来记录每个结点对应级别的结点
    public enum DBTreeMode { Code = 1, LevelTable = 2 }
 
}
